package com.lx.dao;


import com.lx.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface UserDao {

   List<User> selectAll();

    List<User> selectAllByCondition(Map<String, Object> params);


   User existLoginName(String loginName);


    List<User> userList(Map<String,Object> params);

    User loginUser(User user);

//    int totalCount(Map<String,Object> params);



    User selectById(int id);

    int addUser(User user);
    int updateUser(User user);

    int delUser(int id);

    int modifyUser(@Param("user")User user, @Param("oldPassword")String oldPassword,@Param("newPassword") String newPassword);

}
